//
//  FileManager+additions.swift
//  LieLuoBo_B
//
//  Created by Yun on 2017/11/7.
//  Copyright © 2017年 Yun. All rights reserved.
//

import UIKit

extension FileManager {
    open class func createDirIfNeed(dir: String) {
        var isDir: ObjCBool = ObjCBool(true)
        let exist = FileManager.default.fileExists(atPath: dir, isDirectory: &isDir)
        if !exist {
            try! FileManager.default.createDirectory(atPath: dir, withIntermediateDirectories: true, attributes: nil)
        }
    }
}
